/*
 * @Author: fishroom
 * @Date: 2021-08-22 20:38:12
 * @LastEditTime: 2021-08-31 14:28:10
 * @FilePath: \backstage\src\store\home\home.js
 */

import axios from "axios";

// 首页请求
export function getHomeBanner() {
  axios.get("/api/front/zuoLuo/queryZuoLuoImg").then(res => {
    console.log(res);
    // commit("homeBanner", res);
  });
}
export function rqsLogin({ commit }, obj) {
  axios
    .post(
      "/api/back/login?userNumber=" +
        obj.userNumber +
        "&password=" +
        obj.password
    )
    .then(res => {
      commit("getLogin", res.data.data);
      if (res.data.data.code === 200) {
        this.token = res.data.data;
        commit("set_token", this.token);
      }
    });
}
